package com.qyer.commons.utils;

import static org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * User: Z J Wu Date: 2016/06/30 Time: 14:42 Package: com.qyer.pushengine.ios.exception
 */
public class RepeatableOperationResult<T> {

  private int tryCount;
  private T result;

  public RepeatableOperationResult(int tryCount, T result) {
    this.tryCount = tryCount;
    this.result = result;
  }

  public int getTryCount() {
    return tryCount;
  }

  public void setTryCount(int tryCount) {
    this.tryCount = tryCount;
  }

  public T getResult() {
    return result;
  }

  public void setResult(T result) {
    this.result = result;
  }

  @Override
  public String toString() {
    return new ToStringBuilder(this, SHORT_PREFIX_STYLE).append("tryCount", tryCount)
                                                        .append("result", result).toString();
  }
}
